package com.sy.service;

import com.sbring.BeanPostProcessor;
import com.sbring.Component;

//@Component("beanPostProcessor1")
public class BeanPostProcessor1 implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        if(beanName.equals("userService")) {
            System.out.println("BeanPostProcessor1->"+beanName + "->初始化前");
        }
        return null;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        if(beanName.equals("userService")) {
            System.out.println("BeanPostProcessor1->"+beanName + "->初始化后");
        }
        return null;
    }
}
